import request from '@/utils/request'

// 查询菜单列表
export function listBook(query) {
    return request({
        url: '/book/list',
        method: 'get',
        params: query
    })
}

// 查询菜单详细
export function getBook(bookId) {
    return request({
        url: '/book/' + bookId,
        method: 'get'
    })
}




// 新增菜单
export function addBook(data) {
    return request({
        url: '/book',
        method: 'post',
        data: data
    })
}

// 修改菜单
export function updateBook(data) {
    return request({
        url: '/book',
        method: 'put',
        data: data
    })
}

// 删除菜单
export function delBook(bookId) {
    return request({
        url: '/book/' + bookId,
        method: 'delete'
    })
}